print("[RG] Modmain is loaded")

do
	local GLOBAL = GLOBAL
	local rawget = GLOBAL.rawget
	local setmetatable = GLOBAL.setmetatable
	setmetatable(env, {__index = function(t, k) return rawget(GLOBAL, k) end})
end

RG_MOD_ACTIVATED = true
GLOBAL.RG_MOD_ACTIVATED = RG_MOD_ACTIVATED

RG_DEBUG = TheSim:GetUsersName() == "857197446@steam"
print("[RG] DebugMode: ", RG_DEBUG)

-- CreateEntity():DoTaskInTime(0, function() TheFrontEnd:PopScreen() end)
PrefabFiles = {
	"rg_world",
	
	"rg_weapons_prefab",
	"rg_debuff_fx",

	"rg_parawormhole",

	"rg_backpack",

	"node_mark",
}

Assets = {
}

local _import = modimport
function modimport(s)
	if not s:match(".*%.lua$") then 
		s = s .. ".lua"
	end
	_import("modmain/"..s)
end

-- modimport "api"   -- move to modworldgenmain
modimport "string"
modimport "tuning"
modimport "debugmap"
modimport "ui"
modimport "world"
modimport "player"
modimport "combat"
modimport "food"
modimport "inventory"
modimport "craft"